﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace PL.Formularios
{
    public partial class frmVenta : Form
    {
        public frmVenta()
        {
            InitializeComponent();
        }

        private void frmVenta_Load(object sender, EventArgs e)
        {
            ventasBindingSource.DataSource = BLL.Operadores.OperadorVentas.GetAll();
        }

        private void embarque_kgembarqueTextBox_KeyPress(object sender, KeyPressEventArgs e)
        {
            e.Handled = Utilerias.Textos.ValidaOnlyNumbers(e);
        }

        private void embarque_unidadesTextBox_KeyPress(object sender, KeyPressEventArgs e)
        {
            e.Handled = Utilerias.Textos.ValidaOnlyNumbers(e);
        }

        private void precio_productorTextBox_KeyPress(object sender, KeyPressEventArgs e)
        {
            e.Handled = Utilerias.Textos.ValidaOnlyNumbers(e);
        }

        private void recepcion_kgembarqueTextBox_KeyPress(object sender, KeyPressEventArgs e)
        {
            e.Handled = Utilerias.Textos.ValidaOnlyNumbers(e);
        }

        private void recepcion_unidadesTextBox_KeyPress(object sender, KeyPressEventArgs e)
        {
            e.Handled = Utilerias.Textos.ValidaOnlyNumbers(e);
        }

        private void recepcion_kgunidadTextBox_KeyPress(object sender, KeyPressEventArgs e)
        {
            e.Handled = Utilerias.Textos.ValidaOnlyNumbers(e);
        }

        private void precio_clienteTextBox_KeyPress(object sender, KeyPressEventArgs e)
        {
            e.Handled = Utilerias.Textos.ValidaOnlyNumbers(e);
        }

        private void merma_kgembarqueTextBox_KeyPress(object sender, KeyPressEventArgs e)
        {
            e.Handled = Utilerias.Textos.ValidaOnlyNumbers(e);
        }

        private void merma_kgunidadTextBox_KeyPress(object sender, KeyPressEventArgs e)
        {
            e.Handled = Utilerias.Textos.ValidaOnlyNumbers(e);
        }

        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("calc");
        }

        private void toolStripButton3_Click(object sender, EventArgs e)
        {
            Utilerias.Formularios.MuestrafrmReporte(this, 3, int.Parse(bindingNavigatorPositionItem.Text));
        }
    }
}
